﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Adams.Public.Api.Controllers
{
    [EnsureHttps]
    public class AnnouncementsController : Controller
    {
        public ActionResult GetAnnouncements()
        {
            var model = DataAccess.Announcements.GetAnnouncements();
            return new JsonXmlResult(model);
        }

        public ActionResult GetAnnouncement(int id)
        {
            var model = DataAccess.Announcements.GetAnnouncement(id);
            return new JsonXmlResult(model);
        }
    }
}
